package core.java.collections;

import java.util.LinkedList;
import java.util.Queue;

/**
 * @author DGW
 * @date 2017 2017??4??19?? ????8:34:50
 * @filename QueueClass.java  
 */
public class QueueClass {
	/**
	 * @category
	 * java ?ж??е????  ???java 1.5??????
	 * ???????
	 *   ??????????? add  remove   collections????
	 *   ?????????????   poll   offer ?????????  ?????
	 *   ????????????? peek    element  ????????????????
	 */
	  public static void main(String[] args) {
		  //Ψ????? ????? list?е????
		  Queue<Integer> queue=new LinkedList<>();
		  queue.offer(1);
		  queue.offer(2);
		  queue.offer(3);
		  queue.offer(4);
		  queue.offer(5);
		  queue.offer(6);
		  queue.offer(7);
		  //?ó???????
		  System.out.println(queue.poll());
		  System.out.println(queue.poll());
		  System.out.println(queue.size());
		}
	}
	
	 
